<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>
        拒绝报价单
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../../css/main.css" media="all">
    <script type="text/javascript" src="../../../../lib/loading/okLoading.js"></script>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../../../lib/layui/css/layui_2.5.7.css">

</head>
<!--借还流水-->
<style>
    .layui-form-label {
        width: 150px !important;
    }
</style>

<body>
<div class="x-nav">
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon"
                                                                        style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body" id="app">
    <form class="layui-form layui-form-pane" id="add">
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <input  autocomplete="off"  type="hidden" id="id" name="id">

                <input  autocomplete="off"  type="hidden" id="type" name="type">

                <div class="layui-form-item">
                    <div style="width: 60% ;clear: both" class="layui-input-inline">
                        <textarea style="width: 500px;height: 255px;margin-left: 13px;" type="text" name="checkRemark" id="checkRemark" placeholder="请输入拒绝原因" class="layui-input"></textarea>
                    </div>
                </div>

                <div style="text-align: center;margin-top: 25px;" class="layui-form-item">
                    <button class="layui-btn" type="button"  onclick="approv()">
                        确认
                    </button>
                </div>
                <div style="height:20px;"></div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="../../../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../../../js/myAjax.js"></script>
<script type="text/javascript" src="../../../../js/pub.js"></script>
<script src="../../../../lib/layui/layui2.5.7.js" charset="utf-8"></script>
<script src="../../../../js/x-layui.js" charset="utf-8"></script>
<script src="../../../../js/vue.min.js" charset="utf-8"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script>
    layui.use(['element', 'layer', 'form', 'laydate'], function () {
        $ = layui.jquery;//jquery
        lement = layui.element();//面包导航
        layer = layui.layer;//弹出层
        laydate = layui.laydate;//日期插件
        form = layui.form;
        okLoading.close($);
    })
</script>
<script>
    let recordId = getQueryVariable("id");
    let types = getQueryVariable("types");
    function approv() {
        const text = $("#checkRemark").val();
        let request = {
            url: 'kf/quotation/approveQuotation',
            data: {
                userId: $userId,
                id: recordId,
                approverId : $userId,
                type : types,
                approverRemake : text
            },
            method: "GET",
        };

        sendRequest(request, (data) => {
            if (data.code === 0) {
                layer.alert("操作成功", {
                        icon: 6
                    },
                    function () {
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                        parent.location.reload();
                    });
            } else {
                layer.alert(data.msg, {
                    icon: 5
                })
            }
        });
        return false;
    }

</script>

</body>

</html>
